﻿CREATE PROCEDURE [dbo].[UserWantBuyRent]
  @Name nvarchar(50)='',
  @Phone nvarchar(20)='',
  @Email nvarchar(50)='',
  @Company nvarchar(50)='',
  @LocationKeyword nvarchar(200)='',
  @PropertyType nvarchar(10)='',
  @SubmissionType nvarchar(10)='Sale',
  @Price numeric = 100,
  @UseInvest nvarchar(10) = 'Y',
  @Remark nvarchar(200)=''
AS
BEGIN

	SET NOCOUNT ON;
-- INSERT QUERY INFO INTO Mobile_UserQueryTransact
DECLARE @ID uniqueidentifier = NEWID()
DECLARE @RetID varchar(50)

INSERT INTO Mobile_CustomerWantBuyRent(
[ID],[Name],[Phone],[Email],[Company],[LocationKeyword],[PropertyType],[SubmissionType],[Price],[UseInvest],[Remark])
VALUES (@ID,@Name,@Phone,@Email, @Company, @LocationKeyword,@PropertyType,@SubmissionType,@Price,@UseInvest,@Remark);

SET @RetID = convert(nvarchar(50), @ID);

SELECT	@RetID as N'@RetID'
RETURN 1;	
END
